package fuxi1;

public class Cat {
    String name;
    int age;
    String gender;
    int weight;

    public Cat(){

    }
    public Cat(String name,int age,String gender,int weight){
        this.name=name;
        this.age=age;
        this.gender=gender;
        this.weight=weight;
    }

    public String eat(String food){
        System.out.println("猫咪最爱吃的食物是"+food);
        return food;
    }

    public int hobby(int age,String hb){
        System.out.println("猫咪的年龄为:"+age+",爱好是:"+hb);
        return age;
    }


    public int compute(int[] nums){
        int max=0;
        for (int num:nums){
            if(num>max){
                max=num;
            }
        }
        System.out.println("数组中最大值为"+max);
        return max;
    }

    public Cat showInfo(String name,int age,String gender,int weight){
        Cat cat=new Cat(name,age,gender,weight);
        return cat;
    }


}
